<template>
  <div class="app-container">
    <div class="tr">
      <el-button-group>
        <el-button :type="currentComponent==='user'?'primary':''" @click="changeModel('user')">列表模式</el-button>
        <el-button :type="currentComponent==='userOrg'?'primary':''" @click="changeModel('userOrg')">机构模式</el-button>
      </el-button-group>
    </div>
    <component :is="currentComponent" />
  </div>
</template>
<script>
import user from './user.vue'
import userOrg from './userOrg'
export default {
  components: { user, userOrg },
  data() {
    return {
      currentComponent: 'user'
    }
  },
  methods: {
    changeModel(view) {
      this.currentComponent = view
    }
  }
}
</script>
